<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>RPMsg-Lite User&#39;s Guide: RPMsg Name Service Component</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">RPMsg-Lite User&#39;s Guide
   &#160;<span id="projectnumber">Rev. 2.2.0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__rpmsg__ns.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">RPMsg Name Service Component</div>  </div>
</div><!--header-->
<div class="contents">

<p>This section describes the RPMsg Name Service component that allows:  
<a href="#details">More...</a></p>
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>This section describes the RPMsg Name Service component that allows: </p>
<ul>
<li>Transmission of named endpoint creation and deletion announcement.</li>
<li>Reception of the announcements. </li>
</ul>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:structrpmsg__ns__callback__data"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__callback__data">rpmsg_ns_callback_data</a></td></tr>
<tr class="separator:structrpmsg__ns__callback__data"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structrpmsg__ns__context"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__context">rpmsg_ns_handle</a></td></tr>
<tr class="separator:structrpmsg__ns__context"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:structrpmsg__ns__static__context__container"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__static__context__container">rpmsg_ns_static_context</a></td></tr>
<tr class="separator:structrpmsg__ns__static__context__container"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga600c32ccc3d6a112cce7d1556433af62"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga600c32ccc3d6a112cce7d1556433af62"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>RL_NS_EPT_ADDR</b></td></tr>
<tr class="separator:ga600c32ccc3d6a112cce7d1556433af62"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga9c275f7b254e1e3b3a704f17137bd440"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9c275f7b254e1e3b3a704f17137bd440"></a>
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#ga9c275f7b254e1e3b3a704f17137bd440">rpmsg_ns_new_ept_cb</a>) (unsigned int new_ept, const char *new_ept_name, unsigned long flags, void *user_data)</td></tr>
<tr class="memdesc:ga9c275f7b254e1e3b3a704f17137bd440"><td class="mdescLeft">&#160;</td><td class="mdescRight">New endpoint NS callback function type. <br /></td></tr>
<tr class="separator:ga9c275f7b254e1e3b3a704f17137bd440"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaae8af25ce18492d5dfad107b5097c49c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaae8af25ce18492d5dfad107b5097c49c"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>rpmsg_ns_flags</b> { <br />
&#160;&#160;<b>RL_NS_CREATE</b>, 
<br />
&#160;&#160;<b>RL_NS_DESTROY</b>
<br />
 }</td></tr>
<tr class="separator:gaae8af25ce18492d5dfad107b5097c49c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab2e44f497543e00f358bba04566b5e36"><td class="memItemLeft" align="right" valign="top">rpmsg_ns_handle&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#gab2e44f497543e00f358bba04566b5e36">rpmsg_ns_bind</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, <a class="el" href="group__rpmsg__ns.html#ga9c275f7b254e1e3b3a704f17137bd440">rpmsg_ns_new_ept_cb</a> app_cb, void *user_data)</td></tr>
<tr class="memdesc:gab2e44f497543e00f358bba04566b5e36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers application nameservice callback.  <a href="#gab2e44f497543e00f358bba04566b5e36">More...</a><br /></td></tr>
<tr class="separator:gab2e44f497543e00f358bba04566b5e36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga359637fe5894c438c7cbd795f28ecd31"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#ga359637fe5894c438c7cbd795f28ecd31">rpmsg_ns_unbind</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, rpmsg_ns_handle handle)</td></tr>
<tr class="memdesc:ga359637fe5894c438c7cbd795f28ecd31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unregisters application nameservice callback and cleans up.  <a href="#ga359637fe5894c438c7cbd795f28ecd31">More...</a><br /></td></tr>
<tr class="separator:ga359637fe5894c438c7cbd795f28ecd31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga50008dfe70bc440c7803bd44fc1bdc2a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__rpmsg__ns.html#ga50008dfe70bc440c7803bd44fc1bdc2a">rpmsg_ns_announce</a> (struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *rpmsg_lite_dev, struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *new_ept, char *ept_name, unsigned long flags)</td></tr>
<tr class="memdesc:ga50008dfe70bc440c7803bd44fc1bdc2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends name service announcement to remote device.  <a href="#ga50008dfe70bc440c7803bd44fc1bdc2a">More...</a><br /></td></tr>
<tr class="separator:ga50008dfe70bc440c7803bd44fc1bdc2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Class Documentation</h2>
<a name="structrpmsg__ns__callback__data" id="structrpmsg__ns__callback__data"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_ns_callback_data</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a02e5cbf5390e2dff441590b2320a8dae"></a><a class="el" href="group__rpmsg__ns.html#ga9c275f7b254e1e3b3a704f17137bd440">rpmsg_ns_new_ept_cb</a></td>
<td class="fieldname">
cb</td>
<td class="fielddoc">
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ac8005ef661e83b4e1194e5a216879271"></a>void *</td>
<td class="fieldname">
user_data</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<a name="structrpmsg__ns__context" id="structrpmsg__ns__context"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_ns_context</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a84d6877d4fc4f533c84004a48c304644"></a>struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *</td>
<td class="fieldname">
ept</td>
<td class="fielddoc">
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a89db4bf8601f3786b1c7076472c4c749"></a>struct <a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__callback__data">rpmsg_ns_callback_data</a> *</td>
<td class="fieldname">
cb_ctxt</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<a name="structrpmsg__ns__static__context__container" id="structrpmsg__ns__static__context__container"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct rpmsg_ns_static_context_container</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="fieldtable">
<tr><th colspan="3">Class Members</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="adb9124f3ad2e764e3d3266e953034e1d"></a>struct <br class="typebreak" />
<a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__ept__static__context">rpmsg_lite_ept_static_context</a></td>
<td class="fieldname">
ept_ctxt</td>
<td class="fielddoc">
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="a8bfe9304a786baee4a6043e84d7882a4"></a>struct <a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__callback__data">rpmsg_ns_callback_data</a></td>
<td class="fieldname">
cb_ctxt</td>
<td class="fielddoc">
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="aa1a0ab21719083266c19c8102c5445c7"></a>struct <a class="el" href="group__rpmsg__ns.html#structrpmsg__ns__context">rpmsg_ns_context</a></td>
<td class="fieldname">
ns_ctxt</td>
<td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab2e44f497543e00f358bba04566b5e36"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rpmsg_ns_handle rpmsg_ns_bind </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__rpmsg__ns.html#ga9c275f7b254e1e3b3a704f17137bd440">rpmsg_ns_new_ept_cb</a>&#160;</td>
          <td class="paramname"><em>app_cb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Registers application nameservice callback. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">app_cb</td><td>Application nameservice callback </td></tr>
    <tr><td class="paramname">user_data</td><td>Application nameservice callback data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NameService handle, to be kept for unbinding. </dd></dl>

</div>
</div>
<a class="anchor" id="ga359637fe5894c438c7cbd795f28ecd31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_ns_unbind </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rpmsg_ns_handle&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unregisters application nameservice callback and cleans up. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">handle</td><td>NameService handle</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of function execution, RL_SUCCESS on success. </dd></dl>

</div>
</div>
<a class="anchor" id="ga50008dfe70bc440c7803bd44fc1bdc2a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rpmsg_ns_announce </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__instance">rpmsg_lite_instance</a> *&#160;</td>
          <td class="paramname"><em>rpmsg_lite_dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="group__rpmsg__lite.html#structrpmsg__lite__endpoint">rpmsg_lite_endpoint</a> *&#160;</td>
          <td class="paramname"><em>new_ept</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>ept_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends name service announcement to remote device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rpmsg_lite_dev</td><td>RPMsg-Lite instance </td></tr>
    <tr><td class="paramname">new_ept</td><td>New endpoint to announce </td></tr>
    <tr><td class="paramname">ept_name</td><td>Name for the announced endpoint </td></tr>
    <tr><td class="paramname">flags</td><td>Channel creation/deletion flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status of function execution, RL_SUCCESS on success </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
